use quotient rule to take derivative with trigonometric functions